<template>
  <div class="app">
    <nav-menu class="nav" v-if="!isShowNav"></nav-menu>
    <router-view class="main"></router-view>
  </div>
</template>

<script>
import NavMenu from '@components/Public/Nav'

export default {
  name: 'app',
  components: {NavMenu},
  data () {
    return {}
  },
  computed: {
    isShowNav () {
      let path = this.$route.path
      return path.indexOf('/login') === 0 || path.indexOf('/register') === 0
    }
  }
}
</script>

<style>
  @import url(./assets/css/base.css);
  .app {
    display: flex;
  }
  .nav {
    width: 200px;
    height: 100vh;
  }
  .main {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    flex: 1;
    background-color: #fafafa;
    padding: 15px;
  }
</style>
